package com.portal.incurridos.persistence.wall;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * @author Alan D�vila
 * e-mail ustargab@gmail.com
 * date 08/11/2013 00:44:19
 */
@Entity
@Table(schema = "app", name = "card")
@SequenceGenerator(sequenceName = "app.card_card_seq", name = "idgen", allocationSize = 1)
public class Card {

	/**
	 * Identifier of card.
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "idgen")
	private Long card;
	/**
	 * Identifier of wall.
	 */
	@Id
	private Integer wall;
	/**
	 * Created user of card.
	 */
	private String createuser;
	/**
	 * Assigned user of card.
	 */
	private String assigneduser;
	/**
	 * Description for card.
	 */
	private String description;
	/**
	 * Lista de checks.
	 */
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
	@JoinColumn(name = "card")
	private List<CheckList> checkList;
	/**
	 * Lista de comentarios.
	 */
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
	@JoinColumn(name = "card")
	private List<Comment> comments;
	/**
	 * Lista of incurred.
	 */
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
	@JoinColumn(name = "card")
	private List<Incurred> incurred;
	/**
	 * List of due dates.
	 */
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
	@JoinColumn(name = "card")
	private List<Commitment> commitment;
	/**
	 * @return the card
	 */
	public final Long getCard() {
		return card;
	}
	/**
	 * @param cardIn the card to set
	 */
	public final void setCard(final Long cardIn) {
		this.card = cardIn;
	}
	/**
	 * @return the description
	 */
	public final String getDescription() {
		return description;
	}
	/**
	 * @param descriptionIn the description to set
	 */
	public final void setDescription(final String descriptionIn) {
		this.description = descriptionIn;
	}
	/**
	 * @return the checkList
	 */
	public final List<CheckList> getCheckList() {
		return checkList;
	}
	/**
	 * @param checkListIn the checkList to set
	 */
	public final void setCheckList(final List<CheckList> checkListIn) {
		this.checkList = checkListIn;
	}
	/**
	 * @return the comments
	 */
	public final List<Comment> getComments() {
		return comments;
	}
	/**
	 * @param commentsIn the comments to set
	 */
	public final void setComments(final List<Comment> commentsIn) {
		this.comments = commentsIn;
	}
	/**
	 * @return the wall
	 */
	public final Integer getWall() {
		return wall;
	}
	/**
	 * @param wallIn the wall to set
	 */
	public final void setWall(final Integer wallIn) {
		this.wall = wallIn;
	}
	/**
	 * @return the createuser
	 */
	public final String getCreatedUser() {
		return createuser;
	}
	/**
	 * @param createdUserIn the createuser to set
	 */
	public final void setCreatedUser(final String createdUserIn) {
		this.createuser = createdUserIn;
	}
	/**
	 * @return the assigneduser
	 */
	public final String getAssignedUser() {
		return assigneduser;
	}
	/**
	 * @param assignedUserIn the assigneduser to set
	 */
	public final void setAssignedUser(final String assignedUserIn) {
		this.assigneduser = assignedUserIn;
	}
	/**
	 * @return the incurred
	 */
	public final List<Incurred> getIncurred() {
		return incurred;
	}
	/**
	 * @param incurredIn the incurred to set
	 */
	public final void setIncurred(final List<Incurred> incurredIn) {
		this.incurred = incurredIn;
	}
	/**
	 * @return the commitment
	 */
	public final List<Commitment> getCommitment() {
		return commitment;
	}
	/**
	 * @param commitmentIn the commitment to set
	 */
	public final void setCommitment(final List<Commitment> commitmentIn) {
		this.commitment = commitmentIn;
	}
}
